const  gettoken = async function(that){
          await uni.login({
            provider:"weixin",
            success: (res) => {
              if(res.code){
                uni.$req.req(that,'login',{"code":res.code}).then((res)=>{
                  that.token = res.result
                  uni.setStorageSync('token',that.token)
                })
              }
              else return uni.$showMsg("用户信息请求失败")
            }
          })
        
      }

module.exports = {
	gettoken
}